<template>
	<view class="searchPage">
		<!-- <u-navbar title="纪念馆风格选择" :placeholder="true" leftIconColor="#fff" :autoBack="true" :bgColor="bgColor"
			:titleStyle="titleStyle"></u-navbar> -->
			<headerinfo></headerinfo>
			<!-- <headertop :inv="4"></headertop> -->
							<backos></backos>
		<view class="guanlist">
			<view class="list" @click="check(item)" v-for="(item,index) in list" :key="index">
				<image :src="item.styleImageUrl" mode="widthFix"></image>
				<span>{{item.styleName}}</span>
				<view class="btn">
					选择
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				bgColor: '#de4849',
				titleStyle: {
					color: '#fff'
				},
				list: []
			};
		},
		onLoad(e) {
			this.getData()
		},
		methods: {
			getData() {
				this.$api.museumStylequeryAvailableMuseumStyle().then(res => {
					console.log(res)
					this.list = res
				})
			},
			check(item) {
				uni.$emit('checkguanStyle', item)
				uni.navigateBack({
					delta: 1
				})
			}
		}
	};
</script>


<style lang="scss" scoped>
	.guanlist {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		padding: 20rpx;
width: 60%;
		margin-left: 2.5%;
		margin-top: 20rpx;
		flex-wrap: wrap;
		margin: 30px auto;
		padding: 20px;
		box-shadow: 0 0 3px #ccc;
		border-radius: 20rpx;
		position: relative;
		.list {
			width: 23%;
			padding: 20rpx;
			background-color: #fff;
			border-radius: 20rpx;
			margin-bottom: 20rpx;
			font-size: 26rpx;
box-shadow: 0 0 3px #ccc;
			image {
				width: 100%;
				height: auto;

			}

			.btn {
				width: 180rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				background-image: linear-gradient(135deg, #FEB692 10%, #EA5455 100%);
				color: #fff;
				padding: 15rpx 0;
				border-radius: 10rpx;
				font-size: 26rpx;
				margin: 20rpx auto;
				margin-bottom: 0;
				cursor: pointer;
			}
		}
	}

	.searchPage {
		width: 100%;
		height: 100vh;
		background-size: 100%;
		background-color: #fff;
	}

	.create {
		width: 600rpx;
		height: 80rpx;
		background: #de4849;
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 30rpx auto;
		border-radius: 20rpx;
	}
</style>